<template>
    <!-- <Child @getData="getData" @changeNumber="changeNumber"/> -->
    <h1>父组件</h1>
    <Child>
        <template #header="p">
            <h6>头部插槽{{ p.yourName }}</h6>
        </template>
            <h6>默认插槽</h6>
        <template #footer>
            <h6>底部插槽</h6>
        </template>
    </Child>

</template>

<script setup>
import { ref } from 'vue';
import Child from './Child.vue';
const number = ref(10);
function getData(data) {
    console.log('子组件的数据', data);
}
function changeNumber() {
    number++;
}
</script>

<style scoped>

</style>